<?php echo $this->doctype(); ?>

<html xmlns = "http://www.w3.org/1999/xhtml"> 
<head>
	<?php echo $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8'); ?> 
    <?php echo $this->headTitle('Admin zfe4c'); ?> 
	<?php echo $this->headLink()->appendStylesheet($this->baseUrl().'/app/templates/admin/css/style.css'); ?>
	<?php echo $this->headLink()->appendStylesheet($this->baseUrl().'/app/templates/admin/js/fancybox/jquery.fancybox-1.3.4.css'); ?>
	<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/app/templates/admin/js/jquery144.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/app/templates/admin/js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl(); ?>/app/templates/admin/js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<script language="javascript">
	
	$(document).ready(function() {
		$("a.fancybox").fancybox({
			//'overlayShow'	: false,
			//'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic',
			//'opacity'		: true,
			//'overlayShow'	: false,
			'transitionIn'	: 'elastic',
			'titlePosition'	: 'outside',
			'titlePosition'	: 'inside',
			'overlayColor'	: '#222',
			//'overlayOpacity': 0.4,
			//'padding'			: 0,
			//'autoScale'			: false,
			//'type'				: 'iframe',
			//'width'				: '75%',
			//'height'			: '75%',
		});
	});
	// check all
	function onCheckAll(){
		var check=document.getElementsByName('chkMasCheck');			
		var items=document.getElementsByName('chk');	        
		if( check[0].checked==true){
			for(var i=0;i<items.length;i++){
				items[i].checked=true;	
			}
		}else{
			for(var i=0;i<items.length;i++){
				items[i].checked=false;	
			}
		}
	}
	
	// link add
	function onAdd(_dr){
		window.location.href="<?php echo $this->baseUrl(); ?>"+_dr;
	}
	function onDel(_dr){
		if(confirm("Do you want to delete this data?")){
			window.location.href="<?php echo $this->baseUrl(); ?>"+_dr;	
		}
	}
	
	
	// delete all
	function onDelAll(_dr){	
		var items=document.getElementsByName('chk');
		var arr = '';	        
		for(var i=0;i<items.length;i++){
			if(items[i].checked==true){
				arr+=items[i].value+",";
			}	
		}
		if(arr.length==0){
			alert("You must be at least one item");	
		}
		if(arr.length==1){
			var listId=arr.substring(0,arr.length-1);
			if(confirm("do you want to delete the data?")){
				window.location.href="<?php echo $this->baseUrl(); ?>"+_dr+listId;
			}	
		}
		if(arr.length>1){
			var listId=arr.substring(0,arr.length-1);
			if(confirm("do you want to delete these datas?")){
				window.location.href="<?php echo $this->baseUrl(); ?>"+_dr+listId;
			}
		}
	}
	</script>
</head>
<body>
	<div class="wrapper">
		<div class="header">
			<div class="banner"><img src="<?php echo $this->baseUrl()?>/app/templates/admin/images/banner.jpg" /></div>
			<div class="top-menu"><?php echo $this->action('menu','index','admin'); ?></div>
		</div>
		<div class="clr"></div>
		<div class="main-contain">
			<div class="main-left"><?php echo $this->action('leftmenu','index','admin'); ?></div>
			<div class="main-content"><?php echo $this->layout()->content; ?></div>
		</div>
		<div class="clr"></div>
		<div class="footer">
			<div class="bottom-menu"><?php echo $this->action('footer','index','admin') ?></div>
			<div class="clr"></div>
			<div class="copy-right">&copy; copyright <span><a href="">Learning English</a></span><br /> Code by &nbsp;&nbsp;<span style="color:#990000;">vuhai_4187</span>&nbsp;&nbsp; in  2011-2012</div>
		</div>
	</div>
</body>
</html>   